﻿using System.Linq;
using Common.Views;
using PetaPoco;
using Sanelib.DataView.Impl;

namespace Common.Infrastructure.DataAccess.Impl
{
    public class HealthViewRepository : ViewRepository<HealthView>, IHealthViewRepository
    {
        public HealthView[] HeathData()
        {
            return Fetch(new Sql("Select top 60 * FROM HealthView  order by RecordTime")).OrderByDescending(x=>x.HealthType).ThenByDescending(x=>x.RecordTime).ToArray();
        }
    }
}
